import { createApp } from 'vue'
import App from './App.vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import { createPinia } from 'pinia';
// pinia store
import pinia from "@/store/index";
import router from './router'
import setup from './setup'
import i18n from "@/plugins/vuel18n/index";
import * as elIcons from '@element-plus/icons-vue'

import * as NetIcons from '@/assets/icons/index'
const app = createApp(App);
app.use(ElementPlus);
//两种引入icon方式
//引入ICON
for (let icon in elIcons) {
	app.component(`ElIcon${icon}`, elIcons[icon]);
}
// Object.keys(elIcons).forEach(key => {
// 	app.component(key, elIcons[key as keyof typeof Icons]);
// });
//统一注册Net-icon图标
for (let icon in NetIcons) {
	app.component(`NetIcon${icon}`, NetIcons[icon])
}
// app.use(createPinia());
app.use(pinia);
app.use(router);
app.use(i18n);
app.use(setup);
app.mount('#app')
